Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
be->blkif = alloc_blkif(be->frontend_id);
if (IS_ERR(be->blkif)) {
- /* XXX SMH: should free blkif here... hmm */
err = PTR_ERR(be->blkif);
be->blkif = NULL;
xenbus_dev_error(dev, err, "creating block interface");
err = vbd_create(be->blkif, handle, be->pdev, be->readonly);
if (err) {
- /* XXX SMH: should free blkif here too... */
- be->blkif = NULL;
+ blkif_put(be->blkif);
+ be->blkif = NULL;
xenbus_dev_error(dev, err, "creating vbd structure");
return;
}